home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / djgpp / include / x11 / intrinsp.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-08-11  |  8.0 KB  |  297 lines

  1. /* $XConsortium: IntrinsicP.h,v 1.57 91/06/26 19:33:20 converse Exp $ */
  2.  
  3. /***********************************************************
  4. Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts,
  5. and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
  6.  
  7.                         All Rights Reserved
  8.  
  9. Permission to use, copy, modify, and distribute this software and its
  10. documentation for any purpose and without fee is hereby granted,
  11. provided that the above copyright notice appear in all copies and that
  12. both that copyright notice and this permission notice appear in
  13. supporting documentation, and that the names of Digital or MIT not be
  14. used in advertising or publicity pertaining to distribution of the
  15. software without specific, written prior permission.
  16.  
  17. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  18. ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
  19. DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
  20. ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
  21. WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
  22. ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  23. SOFTWARE.
  24.  
  25. ******************************************************************/
  26.  
  27. #ifndef _XtintrinsicP_h
  28. #define _XtintrinsicP_h
  29.  
  30. #include <X11/Intrinsc.h>
  31.  
  32. #if defined(__WATCOMC__) && defined(MSDOS)
  33. struct _XtStateRec;
  34. #endif
  35.  
  36. typedef struct {
  37.     XrmQuark    xrm_name;      /* Resource name quark        */
  38.     XrmQuark    xrm_class;      /* Resource class quark        */
  39.     XrmQuark    xrm_type;      /* Resource representation type quark */
  40.     Cardinal    xrm_size;      /* Size in bytes of representation    */
  41.     long int    xrm_offset;      /* -offset-1                */
  42.     XrmQuark    xrm_default_type; /* Default representation type quark    */
  43.     XtPointer    xrm_default_addr; /* Default resource address        */
  44. } XrmResource, *XrmResourceList;
  45.  
  46. typedef unsigned long XtVersionType;
  47.  
  48. #define XT_VERSION 11
  49. #ifndef XT_REVISION
  50. #define XT_REVISION 5
  51. #endif
  52. #define XtVersion (XT_VERSION * 1000 + XT_REVISION)
  53. #define XtVersionDontCheck 0
  54.  
  55. typedef void (*XtProc)(
  56. #if NeedFunctionPrototypes
  57.     void
  58. #endif
  59. );
  60.  
  61. typedef void (*XtWidgetClassProc)(
  62. #if NeedFunctionPrototypes
  63.     WidgetClass /* class */
  64. #endif
  65. );
  66.  
  67. typedef void (*XtWidgetProc)(
  68. #if NeedFunctionPrototypes
  69.     Widget    /* widget */
  70. #endif
  71. );
  72.  
  73. typedef Boolean (*XtAcceptFocusProc)(
  74. #if NeedFunctionPrototypes
  75.     Widget    /* widget */,
  76.     Time*    /* time */
  77. #endif
  78. );
  79.  
  80. typedef void (*XtArgsProc)(
  81. #if NeedFunctionPrototypes
  82.     Widget    /* widget */,
  83.     ArgList    /* args */,
  84.     Cardinal*    /* num_args */
  85. #endif
  86. );
  87.  
  88. typedef void (*XtInitProc)(
  89. #if NeedFunctionPrototypes
  90.     Widget    /* request */,
  91.     Widget    /* new */,
  92.     ArgList    /* args */,
  93.     Cardinal*    /* num_args */
  94. #endif
  95. );
  96.  
  97. typedef Boolean (*XtSetValuesFunc)(
  98. #if NeedFunctionPrototypes
  99.     Widget     /* old */,
  100.     Widget     /* request */,
  101.     Widget     /* new */,
  102.     ArgList     /* args */,
  103.     Cardinal*    /* num_args */
  104. #endif
  105. );
  106.  
  107. typedef Boolean (*XtArgsFunc)(
  108. #if NeedFunctionPrototypes
  109.     Widget    /* widget */,
  110.     ArgList    /* args */,
  111.     Cardinal*    /* num_args */
  112. #endif
  113. );
  114.  
  115. typedef void (*XtAlmostProc)(
  116. #if NeedFunctionPrototypes
  117.     Widget        /* old */,
  118.     Widget        /* new */,
  119.     XtWidgetGeometry*    /* request */,
  120.     XtWidgetGeometry*    /* reply */
  121. #endif
  122. );
  123.  
  124. typedef void (*XtExposeProc)(
  125. #if NeedFunctionPrototypes
  126.     Widget    /* widget */,
  127.     XEvent*    /* event */,
  128.     Region    /* region */
  129. #endif
  130. );
  131.  
  132. /* compress_exposure options*/
  133. #define XtExposeNoCompress        ((XtEnum)False)
  134. #define XtExposeCompressSeries        ((XtEnum)True)
  135. #define XtExposeCompressMultiple    2
  136. #define XtExposeCompressMaximal        3
  137.  
  138. /* modifiers */
  139. #define XtExposeGraphicsExpose          0x10
  140. #define XtExposeGraphicsExposeMerged    0x20
  141. #define XtExposeNoExpose          0x40
  142.  
  143.  
  144. typedef void (*XtRealizeProc)(
  145. #if NeedFunctionPrototypes
  146.     Widget           /* widget */,
  147.     XtValueMask*       /* mask */,
  148.     XSetWindowAttributes* /* attributes */
  149. #endif
  150. );
  151.  
  152. typedef XtGeometryResult (*XtGeometryHandler)(
  153. #if NeedFunctionPrototypes
  154.     Widget        /* widget */,
  155.     XtWidgetGeometry*    /* request */,
  156.     XtWidgetGeometry*    /* reply */
  157. #endif
  158. );
  159.  
  160. typedef void (*XtStringProc)(
  161. #if NeedFunctionPrototypes
  162.     Widget    /* widget */,
  163.     String    /* str */
  164. #endif
  165. );
  166.  
  167.  
  168. typedef struct _XtTMRec {
  169.     XtTranslations  translations;    /* private to Translation Manager    */
  170.     XtBoundActions  proc_table;        /* procedure bindings for actions    */
  171.     struct _XtStateRec *current_state;  /* Translation Manager state ptr     */
  172.     unsigned long   lastEventTime;
  173. } XtTMRec, *XtTM;
  174.  
  175. #include <X11/CoreP.h>
  176. #include <X11/ComposiP.h>
  177. #include <X11/ConstraP.h>
  178. #include <X11/ObjectP.h>
  179. #include <X11/RectObjP.h>
  180.  
  181. #define XtDisplay(widget)    DisplayOfScreen((widget)->core.screen)
  182. #define XtScreen(widget)    ((widget)->core.screen)
  183. #define XtWindow(widget)    ((widget)->core.window)
  184.  
  185. #define XtClass(widget)        ((widget)->core.widget_class)
  186. #define XtSuperclass(widget)    (XtClass(widget)->core_class.superclass)
  187. #define XtIsRealized(object)    (XtWindowOfObject(object) != None)
  188. #define XtParent(widget)    ((widget)->core.parent)
  189.  
  190. #undef XtIsRectObj
  191. #define XtIsRectObj(obj) \
  192.     (((Object)(obj))->object.widget_class->core_class.class_inited & 0x02)
  193.  
  194. #undef XtIsWidget
  195. #define XtIsWidget(obj) \
  196.     (((Object)(obj))->object.widget_class->core_class.class_inited & 0x04)
  197.  
  198. #undef XtIsComposite
  199. #define XtIsComposite(obj) \
  200.     (((Object)(obj))->object.widget_class->core_class.class_inited & 0x08)
  201.  
  202. #undef XtIsConstraint
  203. #define XtIsConstraint(obj) \
  204.     (((Object)(obj))->object.widget_class->core_class.class_inited & 0x10)
  205.  
  206. #undef XtIsShell
  207. #define XtIsShell(obj) \
  208.     (((Object)(obj))->object.widget_class->core_class.class_inited & 0x20)
  209.  
  210. #undef XtIsWMShell
  211. #define XtIsWMShell(obj) \
  212.     (((Object)(obj))->object.widget_class->core_class.class_inited & 0x40)
  213.  
  214. #undef XtIsTopLevelShell
  215. #define XtIsTopLevelShell(obj) \
  216.     (((Object)(obj))->object.widget_class->core_class.class_inited & 0x80)
  217.  
  218. #ifdef DEBUG
  219. #define XtCheckSubclass(w, widget_class_ptr, message)    \
  220.     if (!XtIsSubclass(((Widget)(w)), (widget_class_ptr))) {    \
  221.         String params[3];                \
  222.         Cardinal num_params = 3;            \
  223.         params[0] = ((Widget)(w))->core.widget_class->core_class.class_name;\
  224.         params[1] = (widget_class_ptr)->core_class.class_name;         \
  225.         params[2] = (message);                         \
  226.         XtAppErrorMsg(XtWidgetToApplicationContext((Widget)(w)),         \
  227.             "subclassMismatch", "xtCheckSubclass", "XtToolkitError", \
  228.             "Widget class %s found when subclass of %s expected: %s",\
  229.             params, &num_params);        \
  230.     }
  231. #else
  232. #define XtCheckSubclass(w, widget_class, message)    /* nothing */
  233. #endif
  234.  
  235. _XFUNCPROTOBEGIN
  236.  
  237. extern Widget _XtWindowedAncestor( /* internal; implementation-dependent */
  238. #if NeedFunctionPrototypes
  239.     Widget         /* object */
  240. #endif
  241. );
  242.  
  243. extern void _XtInherit(
  244. #if NeedFunctionPrototypes
  245.     void
  246. #endif
  247. );
  248.  
  249. extern void XtCreateWindow(
  250. #if NeedFunctionPrototypes
  251.     Widget         /* widget */,
  252.     unsigned int     /* window_class */,
  253.     Visual*        /* visual */,
  254.     XtValueMask        /* value_mask */,
  255.     XSetWindowAttributes* /* attributes */
  256. #endif
  257. );
  258.  
  259. extern void XtResizeWidget(
  260. #if NeedFunctionPrototypes
  261.     Widget         /* widget */,
  262.     _XtDimension    /* width */,
  263.     _XtDimension    /* height */,
  264.     _XtDimension    /* border_width */
  265. #endif
  266. );
  267.  
  268. extern void XtMoveWidget(
  269. #if NeedFunctionPrototypes
  270.     Widget         /* widget */,
  271.     _XtPosition        /* x */,
  272.     _XtPosition        /* y */
  273. #endif
  274. );
  275.  
  276. extern void XtConfigureWidget(
  277. #if NeedFunctionPrototypes
  278.     Widget         /* widget */,
  279.     _XtPosition        /* x */,
  280.     _XtPosition        /* y */,
  281.     _XtDimension    /* width */,
  282.     _XtDimension    /* height */,
  283.     _XtDimension    /* border_width */
  284. #endif
  285. );
  286.  
  287. extern void XtResizeWindow(
  288. #if NeedFunctionPrototypes
  289.     Widget         /* widget */
  290. #endif
  291. );
  292.  
  293. _XFUNCPROTOEND
  294.  
  295. #endif /* _XtIntrinsicP_h */
  296. /* DON'T ADD STUFF AFTER THIS #endif */
  297.